import { defineStore } from "pinia";

export const useAlertsStore = defineStore("alerts", {
  // 状态变量
  state() {
    return {
      count: 0,
      firstName: "li",
      lastName: "jack",
    };
  },
  // 计算属性
  getters: {
    fullName() {
      return `${this.lastName} ${this.firstName}`;
    },
  },
  // 方法
  actions: {
    increment() {
      this.count++;
    },
  },
});
